package com.devops.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.devops.admin.config.JSONTypeHandlerPg;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.time.LocalDateTime;


/**
 * @ClassName DOSLogRecord
 * @Description TODO
 * @Author heyabo
 * @Date 2022/8/11 09:41
 * @Version 1.0
 **/
@Data
@TableName(value = "dos_log_record",autoResultMap = true)
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder(toBuilder = true)
public class DOSLogRecord {

    /**
     * id
     **/
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    /**
     * 创建时间
     **/
    private LocalDateTime createTime;
    /**
     * 错误信息
     **/
    @TableField(typeHandler = JSONTypeHandlerPg.class)
    private DOSLogSubject logInfo;
    /**
     * 日志类型 1：访问日志，2：点击日志
     **/
    private Integer logType;
    /**
     * 方法名称
     **/
    private String method;
    /**
     * 方法调用结果 1：成功、2：异常
     **/
    private Integer resultStatus;
    /**
     * 用户id
     **/
    private String userId;
}
